package dbtask

type FetchTaskRequest struct {
	TaskType      string `json:"taskType" binding:"required" remark:"任务类型"`
	Channel       string `json:"channel" binding:"required" remark:"渠道"`
	PageSize      int    `json:"pageSize" binding:"required" remark:"任务数"`
	LockMilli     int64  `json:"lockMilli" binding:"required" remark:"锁定毫秒数"`
	LockedBy      string `json:"lockedBy" binding:"required" remark:"锁定者"`
	FixedLockedBy bool   `json:"fixedLockedBy" remark:"是否固定锁定者"`
	IsDelayedTask bool   `json:"isDelayedTask" remark:"是否延迟任务"`
}

type EndTaskAsFailRequest struct {
	Id     int64  `json:"id" binding:"required" remark:"任务id"`
	Reason string `json:"reason" binding:"required" remark:"原因"`
}

type CommonTaskVo struct {
	Id             int64  `json:"id" remark:"任务id"`
	TaskType       string `json:"taskType" remark:"任务类型"`
	Channel        string `json:"channel" remark:"渠道"`
	Content        string `json:"content" remark:"任务内容"`
	BizId          int64  `json:"bizId" remark:"业务id"`
	ProcessedCount int32  `json:"processedCount" remark:"处理次数"`
	Reason         string `json:"reason" remark:"原因"`
}
